<div class="root">
    <!--收货地址-->
    <address-list v-if="pageLoaded" ref="addrList" :addressList="addressList" :selectedAddrId="addressId" :addressDefaultId="addressDefaultId" @selectAddress="selectAddress" @delAddress="delAddress"></address-list>

    <list ref="list" class="list-wrapper">
        <cell class="cell-panel" v-for="(shop,index) in shopList" :ref="'cel_' + index">
            <shop-panel :sid="shop.sid" :shopType="shop.shoptype" :sname="shop.sname" :hasArrow="false" fontSize=30></shop-panel>

            <div v-for="(g, id) in shop.goods" class="goods-item">
                <order-goods-item :goods="g"></order-goods-item>
            </div>

            <div class="goods-des">
                <div class="des-row" v-if="shop.is_issue == 1">
                    <text class="row-left font-msyhl">请选择自提点</text>

                    <btn-pre @btnClick="issueClick(shop)">{{shop.checkPlotName || '请选择'}}</btn-pre>
                </div>


                <div class="des-row">
                    <text class="row-left font-msyhl">商品金额</text>

                    <text class="row-price font-msyhl">+ {{shop.midprice | currency('¥')}}</text>
                </div>

                <div class="des-row" v-if="shop.midfreight > 0">
                    <text class="row-left font-msyhl">运费</text>

                    <text class="row-price font-msyhl">+ {{shop.midfreight | currency('¥')}}</text>
                </div>

                <div class="des-row" v-if="shop.middiscount > 0">
                    <text class="row-left font-msyhl">优惠</text>

                    <text class="row-price font-msyhl">- {{shop.middiscount | currency('¥')}}</text>
                </div>

                <div class="des-row" v-if="shop.midcouponmoney > 0">
                    <text class="row-left font-msyhl">优惠券减免</text>

                    <text class="row-price font-msyhl">- {{shop.midcouponmoney | currency('¥')}}</text>
                </div>

                <div class="des-row des-row-last">
                    <text class="row-left font-msyhl">共{{shop.midgoodscount}}种商品 小计：</text>
                    <text class="row-price font-msyhl">{{shop.midtotalmoney}}</text>
                </div>
            </div>
        </cell>

        <!--余额支付-->
        <cell class="my_money" v-if="myMoneyResult > 0">
            <div class="my_money_left">
                <text class="my_money_txt font-msyhl">余额{{myMoneyResult | currency('¥')}}</text>
                <text class="my_money_txt font-msyhl" v-if="isMyMoney">,使用{{costMyMoney | currency('¥')}}</text>
            </div>

            <switch-btn :checked="isMyMoney" @change="switchMyMoneyPay"></switch-btn>
        </cell>
    </list>

    <!--footer-->
    <div class="footer" v-if="pageLoaded">
        <text class="footer-txt font-msyhl">合计：</text>
        <text class="footer-price font-msyhl">{{actOrderTotalMoney | currency('¥')}}</text>

        <btn-item :disabled="!canBuy" @btnClick="goToCash">付款</btn-item>
    </div>
</div>